package com.cloud.test;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author DELL
 */
@WebServlet(value = {"/Test04","/test04"})
public class ServletTest04 extends HttpServlet {
    /*@Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("service...");
    }*/

    /**
     * Get请求调用的的方法
     * @param req
     * @param resp
     * @throws ServletException
     * @throws IOException
     * */
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("get method");
    }

    /**
     * post请求调用的的方法
     * @param req
     * @param resp
     * @throws ServletException
     * @throws IOException
     * */
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("post method");
    }
}
